package modules

import "embed"

templ CodeSnippetFromEmbedded(filename, language string, embed embed.FS) {
	if content, err := embed.ReadFile(filename); err != nil {
		<div class="error">Error reading file: { filename }: { err.Error() }</div>
	} else {
		@Code(CodeProps{
			Language:       "templ",
			ShowCopyButton: true,
			CodeContent:    string(content),
		})
	}
}
